<template>
	<!-- 底部导航栏 -->
	<view>
			<u-tabbar
				:value="current"
				@change="router"
				:fixed="true"
				:placeholder="false"
				activeColor="#d81e06"
				:safeAreaInsetBottom="true"
			>
				<u-tabbar-item v-for="(item,index)  in tabbartList" :text="item.text" :icon="item.icon" :key="index"></u-tabbar-item>
				
			</u-tabbar>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabbartList:[
				{
					text:"首页",
					icon:"home",
					pagePath: "/pages/index",
				},
				{
					text:"数据分析",
					icon:"play-right",
					pagePath: "/pages/hotel/analysis/index",
				},
				{
					text:"酒店管理",
					icon:"man-add",
					pagePath: "/pages/hotel/manage/index",
				},
				{
					text:"我的",
					icon:"account",
					pagePath: "/pages/mine/index",
				},
				],
			}
		},
		props: {
			current: {
				type: Number,
				default: 0
			}
		},
		methods: {
			router(index) {
				uni.switchTab({
					url: this.tabbartList[index].pagePath
				})
			}
		}
	}
</script>

<style lang="scss">

</style>
